/*
 * @author  王克鸿
 * @date  2020/12/24 17:01
 * @version 1.0
 */
package com.smsVerification.controller;

import com.smsVerification.pojo.CommonResult;
import com.smsVerification.service.captcha.ICaptchaInfoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Wang KeHong
 */
@RestController
public class CaptchaInfoController {

    final String REQUEST_URL_PREFIX = "/user-message/CaptchaInfo";

    @Resource
    ICaptchaInfoService captchaInfoService;

    /**
     * 严禁公共访问，这个接口是被后端系统调用的，没有被客户端调用的机会
     * 判断验证码是否正确
     *
     * @param captcha     验证码
     * @param phoneNumber 手机号
     * @return 验证码是否正确
     */
    @GetMapping(REQUEST_URL_PREFIX + "/checkCaptcha")
    public CommonResult<Boolean> checkCaptcha(@RequestParam("captcha") int captcha, @RequestParam("phoneNumber") String phoneNumber) {
        //return captchaInfoService.checkCaptcha(captcha, phoneNumber);
        return null;
    }

}
